package com.me.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Service;

import com.me.entity.FileMapping;

@Service
public class FileUploadService {

	
	@Autowired
	HibernateTemplate hibernateTemplate;
 	public void save(FileMapping fm){
		hibernateTemplate.save(fm);
	}
	
 	
 	public List getFileMapping(String newFileName){
 	List list=	hibernateTemplate.find("from FileMapping where newfilename='"+newFileName+"'");
 	return list;
 	}
	
}
